package com.jingdianjichi.auth.common.enums;

import lombok.Getter;

/**
 * ClassName:IsDeletedFlagEnum
 * Package:com.jingdianjichi.subject.common.enums
 * Description:
 *
 * @Author fst
 * @Create 2024/9/28 20:12
 * @Version 1.0
 */

@Getter
public enum IsDeletedFlagEnum
{
    DELETED(1,"已删除"),
    UN_DELETED(0,"未删除");

    private  Integer code;
    private  String  desc;

    private IsDeletedFlagEnum(Integer code,String desc)
    {
        this.code=code;
        this.desc=desc;
    }

    public static IsDeletedFlagEnum getByCode(Integer code)
    {
        for (IsDeletedFlagEnum isDeletedFlagEnum: IsDeletedFlagEnum.values()) {
            if(isDeletedFlagEnum.code==code)
            {
                return isDeletedFlagEnum;
            }
        }
        return null;
    }
}
